
{******************************************************************************}
{                                                                              }
{                               XML Data Binding                               }
{                                                                              }
{         Generated on: 2008-1-25 9:49:42                                      }
{       Generated from: F:\projects\QueryItSuite\QI.ClientApp\bin\system.xml   }
{                                                                              }
{******************************************************************************}

unit XmlSystem;

interface

uses xmldom, XMLDoc, XMLIntf;

type

{ Forward Decls }

  IXMLQiClientType = interface;
  IXMLWebservice_addrType = interface;
  IXMLSystemType = interface;
  IXMLLocalType = interface;

{ IXMLQiClientType }

  IXMLQiClientType = interface(IXMLNode)
    ['{9AF00130-D4FB-4DC0-8D10-E1E6825F1549}']
    { Property Accessors }
    function Get_Webservice_addr: IXMLWebservice_addrType;
    function Get_Local: IXMLLocalType;
    { Methods & Properties }
    property Webservice_addr: IXMLWebservice_addrType read Get_Webservice_addr;
    property Local: IXMLLocalType read Get_Local;
  end;

{ IXMLWebservice_addrType }

  IXMLWebservice_addrType = interface(IXMLNodeCollection)
    ['{D7556C2B-1276-49E8-88C0-2236CA7B58EC}']
    { Property Accessors }
    function Get_Last_sucess_index: Integer;
    function Get_Choose_when_boot: WideString;
    function Get_System(Index: Integer): IXMLSystemType;
    procedure Set_Last_sucess_index(Value: Integer);
    procedure Set_Choose_when_boot(Value: WideString);
    { Methods & Properties }
    function Add: IXMLSystemType;
    function Insert(const Index: Integer): IXMLSystemType;
    property Last_sucess_index: Integer read Get_Last_sucess_index write Set_Last_sucess_index;
    property Choose_when_boot: WideString read Get_Choose_when_boot write Set_Choose_when_boot;
    property System[Index: Integer]: IXMLSystemType read Get_System; default;
  end;

{ IXMLSystemType }

  IXMLSystemType = interface(IXMLNode)
    ['{6BF746FD-184B-4AE1-901A-D7C267CA1FAD}']
    { Property Accessors }
    function Get_Test_ip: WideString;
    function Get_Name: WideString;
    function Get_WsUrl: WideString;
    function Get_SendAuth: WideString;
    function Get_WebUrl: WideString;
    procedure Set_Test_ip(Value: WideString);
    procedure Set_Name(Value: WideString);
    procedure Set_WsUrl(Value: WideString);
    procedure Set_SendAuth(Value: WideString);
    procedure Set_WebUrl(Value: WideString);
    { Methods & Properties }
    property Test_ip: WideString read Get_Test_ip write Set_Test_ip;
    property Name: WideString read Get_Name write Set_Name;
    property WsUrl: WideString read Get_WsUrl write Set_WsUrl;
    property SendAuth: WideString read Get_SendAuth write Set_SendAuth;
    property WebUrl: WideString read Get_WebUrl write Set_WebUrl;
  end;

{ IXMLLocalType }

  IXMLLocalType = interface(IXMLNode)
    ['{D6053F4C-BC7C-42B8-968A-D597F40D6049}']
    { Property Accessors }
    function Get_Version: WideString;
    procedure Set_Version(Value: WideString);
    { Methods & Properties }
    property Version: WideString read Get_Version write Set_Version;
  end;

{ Forward Decls }

  TXMLQiClientType = class;
  TXMLWebservice_addrType = class;
  TXMLSystemType = class;
  TXMLLocalType = class;

{ TXMLQiClientType }

  TXMLQiClientType = class(TXMLNode, IXMLQiClientType)
  protected
    { IXMLQiClientType }
    function Get_Webservice_addr: IXMLWebservice_addrType;
    function Get_Local: IXMLLocalType;
  public
    procedure AfterConstruction; override;
  end;

{ TXMLWebservice_addrType }

  TXMLWebservice_addrType = class(TXMLNodeCollection, IXMLWebservice_addrType)
  protected
    { IXMLWebservice_addrType }
    function Get_Last_sucess_index: Integer;
    function Get_Choose_when_boot: WideString;
    function Get_System(Index: Integer): IXMLSystemType;
    procedure Set_Last_sucess_index(Value: Integer);
    procedure Set_Choose_when_boot(Value: WideString);
    function Add: IXMLSystemType;
    function Insert(const Index: Integer): IXMLSystemType;
  public
    procedure AfterConstruction; override;
  end;

{ TXMLSystemType }

  TXMLSystemType = class(TXMLNode, IXMLSystemType)
  protected
    { IXMLSystemType }
    function Get_Test_ip: WideString;
    function Get_Name: WideString;
    function Get_WsUrl: WideString;
    function Get_SendAuth: WideString;
    function Get_WebUrl: WideString;
    procedure Set_Test_ip(Value: WideString);
    procedure Set_Name(Value: WideString);
    procedure Set_WsUrl(Value: WideString);
    procedure Set_SendAuth(Value: WideString);
    procedure Set_WebUrl(Value: WideString);
  end;

{ TXMLLocalType }

  TXMLLocalType = class(TXMLNode, IXMLLocalType)
  protected
    { IXMLLocalType }
    function Get_Version: WideString;
    procedure Set_Version(Value: WideString);
  end;

{ Global Functions }

function GetQiClient(Doc: IXMLDocument): IXMLQiClientType;
function LoadQiClient(const FileName: WideString): IXMLQiClientType;
function NewQiClient: IXMLQiClientType;

const
  TargetNamespace = '';

implementation

{ Global Functions }

function GetQiClient(Doc: IXMLDocument): IXMLQiClientType;
begin
  Result := Doc.GetDocBinding('QiClient', TXMLQiClientType, TargetNamespace) as IXMLQiClientType;
end;

function LoadQiClient(const FileName: WideString): IXMLQiClientType;
begin
  Result := LoadXMLDocument(FileName).GetDocBinding('QiClient', TXMLQiClientType, TargetNamespace) as IXMLQiClientType;
end;

function NewQiClient: IXMLQiClientType;
begin
  Result := NewXMLDocument.GetDocBinding('QiClient', TXMLQiClientType, TargetNamespace) as IXMLQiClientType;
end;

{ TXMLQiClientType }

procedure TXMLQiClientType.AfterConstruction;
begin
  RegisterChildNode('webservice_addr', TXMLWebservice_addrType);
  RegisterChildNode('local', TXMLLocalType);
  inherited;
end;

function TXMLQiClientType.Get_Webservice_addr: IXMLWebservice_addrType;
begin
  Result := ChildNodes['webservice_addr'] as IXMLWebservice_addrType;
end;

function TXMLQiClientType.Get_Local: IXMLLocalType;
begin
  Result := ChildNodes['local'] as IXMLLocalType;
end;

{ TXMLWebservice_addrType }

procedure TXMLWebservice_addrType.AfterConstruction;
begin
  RegisterChildNode('system', TXMLSystemType);
  ItemTag := 'system';
  ItemInterface := IXMLSystemType;
  inherited;
end;

function TXMLWebservice_addrType.Get_Last_sucess_index: Integer;
begin
  Result := AttributeNodes['last_sucess_index'].NodeValue;
end;

procedure TXMLWebservice_addrType.Set_Last_sucess_index(Value: Integer);
begin
  SetAttribute('last_sucess_index', Value);
end;

function TXMLWebservice_addrType.Get_Choose_when_boot: WideString;
begin
  Result := AttributeNodes['choose_when_boot'].Text;
end;

procedure TXMLWebservice_addrType.Set_Choose_when_boot(Value: WideString);
begin
  SetAttribute('choose_when_boot', Value);
end;

function TXMLWebservice_addrType.Get_System(Index: Integer): IXMLSystemType;
begin
  Result := List[Index] as IXMLSystemType;
end;

function TXMLWebservice_addrType.Add: IXMLSystemType;
begin
  Result := AddItem(-1) as IXMLSystemType;
end;

function TXMLWebservice_addrType.Insert(const Index: Integer): IXMLSystemType;
begin
  Result := AddItem(Index) as IXMLSystemType;
end;

{ TXMLSystemType }

function TXMLSystemType.Get_Test_ip: WideString;
begin
  Result := AttributeNodes['test_ip'].Text;
end;

procedure TXMLSystemType.Set_Test_ip(Value: WideString);
begin
  SetAttribute('test_ip', Value);
end;

function TXMLSystemType.Get_Name: WideString;
begin
  Result := AttributeNodes['name'].Text;
end;

procedure TXMLSystemType.Set_Name(Value: WideString);
begin
  SetAttribute('name', Value);
end;

function TXMLSystemType.Get_WsUrl: WideString;
begin
  Result := AttributeNodes['wsUrl'].Text;
end;

procedure TXMLSystemType.Set_WsUrl(Value: WideString);
begin
  SetAttribute('wsUrl', Value);
end;

function TXMLSystemType.Get_SendAuth: WideString;
begin
  Result := AttributeNodes['sendAuth'].Text;
end;

procedure TXMLSystemType.Set_SendAuth(Value: WideString);
begin
  SetAttribute('sendAuth', Value);
end;

function TXMLSystemType.Get_WebUrl: WideString;
begin
  Result := AttributeNodes['webUrl'].Text;
end;

procedure TXMLSystemType.Set_WebUrl(Value: WideString);
begin
  SetAttribute('webUrl', Value);
end;

{ TXMLLocalType }

function TXMLLocalType.Get_Version: WideString;
begin
  Result := AttributeNodes['version'].Text;
end;

procedure TXMLLocalType.Set_Version(Value: WideString);
begin
  SetAttribute('version', Value);
end;

end.